﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ledict.ConditionExtract.DAL;
using System.Data;
using Ledict.ConditionExtract.Model;

namespace Ledict.ConditionExtract.BLL
{
    public class Express_MatchSituationBLL
    {

        Express_MatchSituationDAL del = new Express_MatchSituationDAL();

        /// <summary>
        /// 根据案由ID去获取组合数据
        /// </summary>
        /// <param name="ccId"></param>
        /// <returns></returns>
        public DataTable GetExpressWordData1(string ccId)
        {
            return del.GetExpressWordData1(ccId);
        }

        /// <summary>
        /// 根据案由ID去获取组合数据
        /// </summary>
        /// <param name="ccId"></param>
        /// <returns></returns>
        public DataTable GetExpressWordData1(string FirId, string queryNodeName)
        {
            return del.GetExpressWordData1(FirId, queryNodeName);
        }

        /// <summary>
        /// 根据案由ID去获取数据
        /// </summary>
        /// <param name="ccId"></param>
        /// <returns></returns>
        public DataTable GetExpressWordData(string ccId)
        {
            return del.GetExpressWordData(ccId);
        }

        /// <summary>
        /// 根据父级Id去获取下级子级数据
        /// </summary>
        /// <param name="ccId"></param>
        /// <returns></returns>
        public DataTable GetExpressNodeData(string ccId)
        {
            return del.GetExpressNodeData(ccId);
        }

        /// <summary>
        /// 根据父级Id去获取下级子级数据（表述库加工专用）
        /// </summary>
        /// <param name="ccId"></param>
        /// <returns></returns>
        public DataTable GetExpressNodeData1(string ccId)
        {
            return del.GetExpressNodeData1(ccId);
        }

        /// 删除表述关系表内容和表述关系内容（争议焦点专用）
        /// </summary>
        /// <param name="cc_ID"></param>
        /// <returns></returns>
        public bool DeleteSys_ExpressAndWordZhengYI(string cc_ID)
        {
            return del.DeleteSys_ExpressAndWordZhengYI(cc_ID);
        }

        /// <summary>
        /// 删除表述关系表内容和表述关系内容（争议焦点不包含本节点专用）
        /// </summary>
        /// <param name="cc_ID"></param>
        /// <returns></returns>
        public bool DeleteSys_ExpressNotZhengYi(string cc_ID)
        {
            return del.DeleteSys_ExpressNotZhengYi(cc_ID);
        }

        /// <summary>
        /// 根据CCID获取是否存在SYS_Express_MatchSituation表中
        /// </summary>
        /// <param name="ccID"></param>
        /// <returns></returns>
        public string ExistsMatchSituationByCCID(string ccID)
        {
            return del.ExistsMatchSituationByCCID(ccID);
        }

        /// <summary>
        /// 获取CC_ID信息
        /// </summary>
        /// <param name="CC_ID"></param>
        /// <returns></returns>
        public SYS_Express_MatchSituation GetMatchSituation(string MS_ID)
        {
            return del.GetMatchSituation(MS_ID);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public string Exists_MatchSituation(string stiuid, int IsMatch, string MatchSource, string AffirmIdeaResult, string AffirmIdeaSource, string AllCombinePid,string parentId,string allParentId)//存在)
        {
            return del.Exists_MatchSituation(stiuid, IsMatch, MatchSource, AffirmIdeaResult, AffirmIdeaSource, AllCombinePid, parentId,allParentId);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public string Exists_MatchSituation1(string stiuid, int IsMatch, string MatchSource, string AffirmIdeaResult, string AffirmIdeaSource, string AllCombinePid, string parentId)//存在)
        {
            return del.Exists_MatchSituation1(stiuid, IsMatch, MatchSource, AffirmIdeaResult, AffirmIdeaSource, AllCombinePid, parentId);
        }

        public string Exists_MatchSituation(string stiuid, int IsMatch, string MatchSource, string AffirmIdeaResult, string AffirmIdeaSource, string AllStituationIDs, string parentId, int ccIsShowExpress)
        {
            return del.Exists_MatchSituation(stiuid, IsMatch, MatchSource, AffirmIdeaResult, AffirmIdeaSource, AllStituationIDs, parentId,ccIsShowExpress);
        }
        public string Exists_MatchSituation(int IsMatch, string AffirmIdeaResult, string AllStituationIDs)//存在)
        {
            return del.Exists_MatchSituation(IsMatch, AffirmIdeaResult, AllStituationIDs);
        }
        /// <summary>
        /// 是否存在该记录 2017-07-13 ljj 修改
        /// </summary>
         public string Exists_MatchSingleSituation1(int IsMatch, string AffirmIdeaResult, string stiuid)
        {
            return del.Exists_MatchSingleSituation1(IsMatch, AffirmIdeaResult,stiuid);
        }

        /// <summary>
        /// 获取本级及子节点数量
        /// </summary>
        /// <param name="stiuid"></param>
        /// <returns></returns>
        public string GetExpressMatchCount(string stiuid)
        {
            return del.GetExpressMatchCount(stiuid);
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="Model"></param>
        /// <returns></returns>
        public bool AddMatchSituation(SYS_Express_MatchSituation Model)
        {
            return del.AddMatchSituation(Model);
        }
        public bool AddMatchSituation(List<SYS_Express_MatchSituation> situationList)
        {
            return del.AddMatchSituation(situationList);
        }

        /// <summary>
        /// 删除表述节点及其表述内容
        /// </summary>
        /// <param name="CC_ID">节点id</param>
        /// <returns></returns>
        public bool DeleteSYS_Express_MatchSituation(string CC_ID)
        {
            return del.DeleteSYS_Express_MatchSituation(CC_ID);
        }

        /// <summary>
        /// 删除表述关系表内容和表述关系内容
        /// </summary>
        /// <param name="cc_ID"></param>
        /// <returns></returns>
        public bool DeleteSys_ExpressAndWord(string cc_ID)
        {
            return del.DeleteSys_ExpressAndWord(cc_ID);
        }

        /// <summary>
        /// 根据节点树界面修改名称后修改表述关系内容表节点名称
        /// 2018-03-07 需求
        /// </summary>
        /// <param name="oldCCName"></param>
        /// <param name="newCCName"></param>
        /// <param name="ccID"></param>
        /// <returns></returns>
        public bool UpdateCCName(string oldCCName, string newCCName, string ccID)
        {
            return del.UpdateCCName(oldCCName, newCCName, ccID);
        }
    }
}
